class 8
Class 8 operators include the unary arithmetic operators + and -.
The operand must be an integer or floating point expression. The result is the data type of the operand.
class 9
Class 9 operators include the unary logical operators ! and !!.
The operand must be an integer or floating point expression. The result is always $$TRUE or $$FALSE .
class 10
Class 10 operators include the unary bitwise operators ~ and NOT .
The operand must be an integer variable or expression, or a function name. When applied to GIANT operands, the result data type is GIANT. Otherwise the result data type is XLONG.
class 11
Class 11 operators include the unary address operators & and &&.
The operand of & must be a variable, string, composite, whole array, array node, or array data element. The operand of && must be a string, whole array, or string in a string array. The result data type is always XLONG.
operator summary
The following table is a summary of the characteristics of all operators recognized by the
language:
OP | ALT | KIND | CLASS | OPERANDS | RETURNS | PREC | COMMENTS |
& | unary | 10 | AnyType | Address | 12 | Address of Object Data | |
&& | unary | 10 | AnyType | Address | 12 | Address of Object Handle | |
! | unary | 9 | Numeric | T/F | 12 | Logical Not (TRUE if 0, else FALSE) | |
!! | unary | 9 | Numeric | T/F | 12 | Logical Test (FALSE if 0, else TRUE) | |
NOT | ~ | unary | 9 | Integer | SameType | 12 | Bitwise NOT |
+ | unary | 8 | Numeric | SameType | 12 | Plus | |
- | unary | 8 | Numeric | SameType | 12 | Minus | |
>>> | binary | 7 | Integer | LeftType | 11 | Arithmetic Up Shift | |
<<< | binary | 7 | Integer | LeftType | 11 | Arithmetic Down Shift | |
<< | binary | 7 | Integer | LeftType | 11 | Bitwise Left Shift | |
>> | binary | 7 | Integer | LeftType | 11 | Bitwise Right Shift | |
** | binary | 4 | Numeric | HighType | 10 | Power | |
/ | binary | 4 | Numeric | HighType | 9 | Divide | |
* | binary | 4 | Numeric | HighType | 9 | Multiply | |
\ | binary | 6 | Numeric | Integer | 9 | Integer Divide | |
MOD | binary | 6 | Numeric | Integer | 9 | Modulus (Integer Remainder) | |
+ | binary | 5 | Numeric | HighType | 8 | Add | |
+ | binary | 5 | String | String | 8 | Concatenate | |
- | binary | 4 | Numeric | HighType | 8 | Subtract | |
AND | & | binary | 3 | Integer | HighType | 7 | Bitwise AND |
XOR | ^ | binary | 3 | Integer | HighType | 6 | Bitwise XOR |
OR | | | binary | 3 | Integer | HighType | 6 | Bitwise OR |
> | !<= | binary | 2 | NumStr | T/F | 5 | Greater-Than |
>= | !< | binary | 2 | NumStr | T/F | 5 | Greater-Or-Equal |
<= | !> | binary | 2 | NumStr | T/F | 5 | Less-Or-Equal |
< | !>= | binary | 2 | NumStr | T/F | 5 | Less-Than |
<> | != | binary | 2 | NumStr | T/F | 4 | Not-Equal |
= | == | binary | 2 | NumStr | T/F | 4 | Equal (also "!<>") |
&& | binary | 1 | Integer | T/F | 3 | Logical AND | |
^^ | binary | 1 | Integer | T/F | 2 | Logical XOR | |
|| | binary | 1 | Integer | T/F | 2 | Logical OR | |
= | binary | NumStr | RightType | 1 | Assignment | ||
T/F | T/F always returned as XLONG |